/**
 *Project: jh-framework
 *File: cn.xkshow.util.regex.WebTags.java 
 *Author: admin@xkshow.cn with the copyrite
 ****************************************************************
 *   VERSION       DATE            BY       CHANGE/COMMENT
 * --------------------------------------------------------------
 *    1.0        2013-4-19        xkshow.cn         create
 ****************************************************************
 *note:
 ***************************************************************/
package cn.xkshow.util.regex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class WebTags {

	/*
	 * HTML Tag
	 */
	public static String clearHTML(String html) {
		if (null == html) {
			return "";
		}

		return Pattern.compile(ConstantRegex.REGEX_WebTag_HTML,
				Pattern.CASE_INSENSITIVE).matcher(html).replaceAll("").trim();
	}

	/*
	 * script Tag
	 */
	public static String clearScript(String script) {
		if (null == script) {
			return "";
		}
		
		return Pattern.compile(ConstantRegex.REGEX_WebTag_SCRIPT,
				Pattern.CASE_INSENSITIVE).matcher(script).replaceAll("").trim();
	}

}
